home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / networking / pgpuam / headers / registerfilelibs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.4 KB  |  55 lines

  1. /*
  2.     File:        RegisterFileLibs.h
  3.  
  4.     Contains:    Temporary, limited release header to let outside developers register import
  5.                 library files and folders with CFM.  Distributed via DTS.
  6.  
  7.     Written by:    Alan W. Lillich, Erik L. Eidt
  8.  
  9.     Copyright:    © 11994-997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.          <1>    11/26/97    law        Inital Checkin
  14.                 11/26/97    law        Added to the project
  15.  
  16.     To Do:
  17. */
  18.  
  19.  
  20.  
  21. #include <Types.h>
  22. #include <Files.h>
  23.  
  24.  
  25. // -------------------------------------------------------------------------------------------
  26. // RegisterFileLibs is public access to a private (SPI) routine for the Code Fragment Manager.
  27. // It allows you to register files and folders that would not otherwise be considered as
  28. // potential import libraries.  It does not cause anything to be actually loaded, just noted
  29. // for later use when resolving imports.  This is intended be used only in cases where the
  30. // import library cannot be in a file of type 'shlb' or cannot be kept in one of the folders
  31. // normally searched for import libraries.  A common example is bundling an import library
  32. // with an INIT, CDEV, etc.; having one file instead of two simplifies distribution.
  33. //
  34. // You may register both files and folders.  Other than location and file type, registered
  35. // files must otherwise be normal import libraries.  In particular they must have a 'cfrg'
  36. // resource of ID 0.  Registered folders will be searched in the normal manner, i.e. for files
  37. // of type 'shlb'.  This folder search is dynamic, if you drag new libraries into the folder
  38. // after it is registered they will be seen.  Alias files may be registered.  The alias will
  39. // be resolved at the time of registration.  If the destination is offline the user will not
  40. // be prompted for a name and password; guest mounts will work.  The file specification passed
  41. // in must have the actual volume reference number, parent directory ID, and a simple name.
  42. //
  43. // *** This is being made available here as an interim measure.  The final API may differ,
  44. // *** however existing binaries will continue to be supported.
  45.  
  46.  
  47. pascal OSErr    RegisterFileLibs    ( FSSpecPtr    fileSpec );
  48.  
  49. pascal OSErr    UnregisterFileLibs    ( FSSpecPtr    fileSpec );
  50.  
  51. // The file specification in both cases must be direct, i.e. it must have proper volume and
  52. // parent directory infromation and the name must be a simple file name (not a path).  One 
  53. // way to ensure this is to have FSMakeFSSpec fill in the file specification for you.
  54.  
  55.